package com.example.game_dafangdaxie.StringConstant;

import java.util.ArrayList;

/***
 * 判断棋子是否占用
 * create by liuTong
 * 2021.9.27
 */
public class TouchList {
    public static boolean Contains(ArrayList<TouchXY> touchXYS,Point point){
        boolean f=false;
        for(TouchXY touchXY:touchXYS){
            if(touchXY.point.x==point.x && touchXY.point.y==point.y){
                f=true;
            }
        }
        return f;
    }
    public static  boolean Contains(ArrayList<TouchXY> touchXYS,TouchXY touchXY){
        boolean f=false;
        int size=touchXYS.size();
        if(size>0){
            for(TouchXY touchXY1:touchXYS){
                if(touchXY1.point.x==touchXY.point.x && touchXY1.point.y==touchXY.point.y&&touchXY1.play==touchXY.play){
                    f=true;
                }
            }
        }
        return f;
    }

}
